package com.shardingsphere.controller;

import com.shardingsphere.entity.User;
import com.shardingsphere.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author biao.yang
 * @Description:
 * @date 2025/2/18 18:17
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;

    @GetMapping("/list")
    public void getList(){
        userService.selectUser();

    }

    @PostMapping("/save")
    public void save(){
        /*User user = new User();
        user.setName("小明"+String.format("%06d",1000000));
        user.setAddress("广州");
        userService.save(user);*/
    }
}
